package Deom;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-11-12
 * Time: 22:21
 */
//父类 图形
public class Shape {
    //成员方法
    public void draw() {
        System.out.println("画图形");
    }

}
//子类 矩形
class Rect extends Shape {
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}
//子类 圆
class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("⚪");
    }
}
//子类 三角形
class Triangle extends Shape {
    @Override
    public void draw() {
        System.out.println("🔺");
    }
}
//子类 花
class Flower extends Shape {
    @Override
    public void draw() {
        System.out.println("❀");
    }
}